Searching for Words


The Search Phrase

The search phrase can consist of one or more words as well as wildcard characters or logical operators. If more than one word is given and no logical operators are used, only files containing all of the words will be listed.

Wild Card Characters

? - When a question mark character is used in a word, it matches any single character in that position. Thus ?at would match cat, bat, hat etc.

* - When an asterisk character is used in a word, it will match any number of characters, including none, at that location. Thus *at would match at, what, cat, bat etc.

Logical Operators

Note that except for the one section discussing quoted search phrases, the quote marks in the examples are not part of the search phrase.

& - If two or more words are listed and they are not separated by a logical operator, Wilbur will only list those files that contain all of the words. In other words, Wilbur will perform a logical AND if no other operator is present. The & character can also be used explicitly if you prefer. The search phrase time travel is equivalent to time & travel and would list only files containing both words.

| - If two words are separated by the | symbol (a vertical bar), then Wilbur will list any file that has either of the words in it. Here Wilbur is performing a logical OR. The search phrase time | travel would list all files containing either word.

^ - If a word is preceded by the ^ symbol, Wilbur will NOT list any file which contains that word. The search phrase time ^travel would list files which contained the word time but did not also contain the word travel.

() - In the absence of parenthesis, Wilbur evaluates an expression from left to right. Thus the expressions:

red blue | green

(red & blue ) | green

are equivalent and would list all files that contained both red and blue or contained green or had all three of them. The expression:

green | red blue

would find all the files that had green or red and also had blue in them and is equivalent to:

(green | red ) & blue

Parenthesis can always be used to ensure the correct ordering of search operations.

Near Operators

Wilbur does not keep word position information in its indexes as that would greatly increase their size. This means Wilbur cannot use its index to determine which files contain words in close proximity to each other, but it does still provide proximity searching.

Near operators are interpreted as simple AND operators for the purpose of initially selecting files.  Wilbur then scans the contents of these files to eliminate any not meeting the near criteria.

Note that the near operators will not work correctly with compound arguments (i.e. in parenthesis). Thus

(travel | time ) < huxley

would have to be written as

(travel < huxley) | (time < huxley)

to work properly.

At this time only the < operator will work in series. That is

tom < thumb < pie

will work as expected, but

tom : thumb : pie

will not.

< - The < symbol is used to designate that the second word must be present within a certain number of words of the first word.

The allowable separation for near words can be set in the File/Preferences dialog, or you can immediately follow the ‘<’ symbol with a number which will override this default. For instance:

Santa <20 sleigh

will only highlight occurrences of ‘Santa’ that are followed within 20 words by 'sleigh'.

> - The > character indicates the after operator. The phrase Santa >20 sleigh is equivalent to sleigh <20 Santa.

: - The : character is the near operator. It combines the meanings of the < and > operators and highlights any occurrence of the two words that are near each other. The phrase Santa :20 sleigh is equivalent to (Santa <20 sleigh) | (Santa >20 sleigh)

" " - Enclosing a string in quotes is the same as separating each word in the string by a <1 operator. Thus the phrase “one fine night” including the quotes is equivalent to the unquoted string one <1 fine <1 night. Both will only highlight the word one when it is immediately followed by fine which is in turn immediately followed by night.

Only Highlighting Some Words

+ - If a search phrase word is preceded by the + character, then that word will be used in determining the files found, but occurrences of the word will not be highlighted in the file contents pane. If the contents pane is in outline mode, lines containing this word will not be shown unless they also contain some other search phrase word.

The phrase time +travel would only list files containing both time and travel, but only time would be highlighted when the files were viewed.

Reusing the Current Search Result

The current search results can be used as the basis of the next search by starting a search phrase with the AND character (&) or the OR character (|). If the search string starts with an & then only files in the current search list which also meet the new criteria will be in the final list. If the search string begins with the | character, then any file meeting the new criteria will be added to the existing file list.

Halting a Search

Note that while most searches are very fast, very general wildcard searches can take a while. You can click in either the contents or file list pane to halt a search if you wish.  If you are doing a near search and Wilbur is scanning the candidate files, it will simply present all the files it hasn't checked yet along with those meeting the near requirement.


Copyright ⌐ 1999 RedTree Development Inc. All rights reserved.
Information in this document is subject to change without notice.
Other products and companies referred to herein are trademarks or registered trademarks of their respective companies or mark holders.